package test_module;

import org.apache.log4j.xml.DOMConfigurator;
import org.openqa.selenium.*;
import org.openqa.selenium.firefox.*;

import page.page_dashboard;
import action.common;
import action.config;
import action.loginLogout;

import org.testng.*;
import org.testng.annotations.*;

public class tm1_login {
	
	@BeforeMethod
	public void beforeMethod() throws Exception {
		DOMConfigurator.configure("src/config/log4j.xml");
		//Open browser		
		d = common.openBrowser(config.cf_url, "ff");
	}
	
	@Test
	public void tm1_login_excute() {		
		
		//1. Enter username n password, click sign in button
		loginLogout.login(d, config.cf_username, config.cf_password);
		
		//2. Check login fail with invalid info
		
		
		//3. Check login success with valid info
		
		
		//Log out
		loginLogout.logout(d);		
		
	}
	
	@AfterMethod
	public void afterMethod() throws Exception {
		d.quit();
	}
	
	WebDriver d = null;
}
